using System;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter46
{
	/// <summary>
	/// Example04: Is Strangeness Conserved?
	/// (A) Use the law of strangeness conservation to determine 
	/// whether the reaction \pi^{0} + n -> K^{+} + \Sigma^{-} occurs.
	/// </summary>
	public class Example04
	{
		public Example04()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			L.Particle pi0 = new L.Particle();
			pi0.Strangeness = 0;
			L.Particle n = new L.Particle();
			n.Strangeness = 0;
			L.Particle Kp = new L.Particle();
			Kp.Strangeness = 1;
			L.Particle Sigmam = new L.Particle();
			Sigmam.Strangeness = -1;

			if(pi0.Strangeness+ n.Strangeness ==  
				Kp.Strangeness + Sigmam.Strangeness)
				result+="OK\r\n";
			else result+="NO\r\n";

			L.Particle pim = new L.Particle();
			pim.Strangeness = 0;
			L.Particle p = new L.Particle();
			p.Strangeness = 0;
	
			if(pim.Strangeness+ p.Strangeness ==  
				pim.Strangeness + Kp.Strangeness)
				result+="OK\r\n";
			else result+="NO\r\n";	
		}
	}
}
